package com.tsunami.authority.entity.admin;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.tsunami.authority.enums.admin.MoldType;
import com.tsunami.authority.enums.admin.TenantType;
import com.tsunami.base.entity.Entity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import lombok.experimental.Accessors;

import java.time.LocalDateTime;

/**
 * @author lx
 * @date 2021-12-02 15:54
 */
@Data
@EqualsAndHashCode(callSuper = true)
@NoArgsConstructor
@AllArgsConstructor
@ToString(callSuper = true)
@Accessors(chain = true)
@TableName("tnm_admin_tenant")
@Schema(description = "租户")
public class Tenant extends Entity<Long> {

    @Schema(description = "租户名称")
    @TableField(value = "tenant_name")
    private String tenantName;

    /**
     * 租户简称
     */
    @Schema(description = "租户简称")
    @TableField(value = "short_name")
    private String shortName;
    /**
     * 联系方式
     */
    @Schema(description = "联系方式")
    @TableField(value = "phone")
    private String phone;
    /**
     * 租户编号
     */
    @Schema(description = "租户编号")
    @TableField(value = "tenant_code")
    private String tenantCode;
    /**
     * 创建者-主管理员
     */
    @Schema(description = "创建者-主管理员")
    @TableField(value = "user_id")
    private Long userId;
    /**
     * 租户行业类型
     */
    @Schema(description = "租户行业类型")
    @TableField(value = "mold")
    private MoldType mold;
    /**
     * 租户会员类型
     */
    @Schema(description = "租户会员类型(0:试用,1:正式,2:VIP,3:SVIP)")
    @TableField(value = "type")
    private TenantType type;
    /**
     * 开通时间
     */
    @Schema(description = "开通时间")
    @TableField(value = "open_time")
    private LocalDateTime openTime;
    /**
     * 到期时间
     */
    @Schema(description = "到期时间")
    @TableField(value = "expire_time")
    private LocalDateTime expireTime;
    @Schema(description = "是否主租户")
    @TableField(value = "master")
    private Boolean master;
}
